package com.wcdxg.flow.room

import androidx.room.Dao
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query

/**
 * Created by ZhouHanJun.
 * on 2021/12/24
 */
@Dao
interface UserDao {

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    suspend fun insert(user: User)


    @Query("SELECT * FROM user")
    fun getAllUser(): kotlinx.coroutines.flow.Flow<List<User>>
}